@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --primary-bg: #0a0e27;
    --secondary-bg: #1a1d3e;
    --accent-blue: #00d4ff;
    --success-green: #00ff88;
    --warning-yellow: #ffb800;
    --error-red: #ff4757;
    --text-primary: #e6eef9;
    --text-secondary: #9aa5b1;
    --border-color: #2a2f55;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
      'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
      sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
  }

  #root {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
}

@layer components {
  .glass-effect {
    background: rgba(26, 29, 62, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
  }

  @media (max-width: 1280px) {
    .responsive-container {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .responsive-header {
      flex-direction: column;
      gap: 1rem;
      align-items: stretch;
    }

    .responsive-search {
      width: 100%;
    }
  }

  @media (max-width: 1024px) {
    .responsive-sidebar {
      position: fixed;
      left: -300px;
      top: 60px;
      bottom: 0;
      width: 300px;
      z-index: 50;
      transition: left 0.3s ease;
    }

    .responsive-sidebar.open {
      left: 0;
    }

    .responsive-main {
      margin-left: 0;
    }

    .responsive-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 768px) {
    .responsive-controls {
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .responsive-controls button {
      flex: 1;
      min-width: 80px;
    }

    .responsive-metrics {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  .neon-glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  }

  .health-indicator {
    transition: all 0.3s ease;
  }

  .health-healthy {
    background-color: var(--success-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  }

  .health-warning {
    background-color: var(--warning-yellow);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
  }

  .health-critical {
    background-color: var(--error-red);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
  }

  .metric-card {
    @apply glass-effect rounded-lg p-4 transition-all hover:neon-glow;
  }

  .progress-bar {
    @apply w-full bg-gray-700 rounded-full h-2 overflow-hidden;
  }

  .progress-fill {
    @apply h-full bg-gradient-to-r from-accent-blue to-success-green transition-all duration-300;
  }

  .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
  }

  .custom-scrollbar::-webkit-scrollbar-track {
    background: var(--secondary-bg);
    border-radius: 3px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 3px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--success-green);
  }
}